﻿using System;
using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace Wedn.Net.UI.Page
{
    /// <summary>
    /// 后台视图基类
    /// </summary>
    public abstract class AdminViewPage<TModel> : BaseViewPage<TModel>
    {
        private string _layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
        /// <summary>
        /// 布局页
        /// </summary>
        public override string Layout
        {
            get
            {
                return _layout;
            }
            set
            {
                _layout = value;
            }
        }

        #region 引入以HTML编码字符串形式呈现的分部视图 +MvcHtmlString Include(string viewName)
        /// <summary>
        /// 引入以HTML编码字符串的形式呈现指定的分部视图。
        /// </summary>
        /// <param name="viewName">要呈现的分部视图的名称</param>
        /// <returns>以HTML编码字符串形式呈现的分部视图</returns>
        protected MvcHtmlString Include(string viewName)
        {
            return Html.Partial(viewName);
        }
        #endregion
    }
}
